<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../5.19/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>{{myTitle}}</p>
        <my-component></my-component>
    </div>
</body>
<template id="myTmp">
    <p>{{myTitle}}</p>
</template>
<script>
    Vue.component('my-component',{
        template:'#myTmp',
        data(){
            return {
                myTitle:"当前自定义title内容"
            }
        }
});
var vm=new Vue({
    el:"#app",
    data:{
        myTitle:"根元素的title内容"
    }
})
</script>
</html>